package com.ym.manager.admin.order;

import com.ym.manager.admin.order.model.Order;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Repository
public interface OrderDao {


    //订单列表总数
    int getOrderListCount(Map<String, Object> map);
    //订单列表
    List<Order> getOrderList(Map<String, Object> map);
    //订单详情
    Order detail(String order_sn);
    //根据uid获取用户信息
    Map<String, Object> getUserInfo(int uid);
    //变更订单状态
    int editOrderStatus(@Param("order_sn") String order_sn,
                        @Param("status") int status,
                        @Param("refundAddress")String refundAddress);

    int updateOrder(@Param("order_sn") String order_sn,
                        @Param("status") int status,
                        @Param("l_id")String l_id,
                        @Param("logistics_company")String logistics_company,
                        @Param("send_date")String send_date,
                        @Param("address")String address);
    //退货列表总数
    int backCount(Map<String, Object> map);
    //退货列表
    List<Order> backData(Map<String, Object> map);
    //记录失效表
    int addInvalid(@Param("order_sn") String order_sn,
                   @Param("mcode") int mcode,
                   @Param("merchant_id") int merchant_id,
                   @Param("date") String date);
    //分佣明细失效
    int expectInvalid(String order_sn);
}
